from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer


def main():
    authorizer = DummyAuthorizer()
    authorizer.add_user('bluhuu', '121516', '//home//cc//下载//', perm='elradfmwMT')
    handler = FTPHandler
    handler.authorizer = authorizer
    handler.passive_ports = range(2000, 2333)
    address = ('192.168.3.6', 2121)
    server = FTPServer(address, handler)
    server.max_cons = 256
    server.max_cons_per_ip = 5
    server.serve_forever()


if __name__ == '__main__':
    main()
